package com.example.demo.controller;

import com.example.demo.module.entity.AgePatient;
import com.example.demo.service.AgePatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/data/age")
public class AgePatientController {
    @Autowired
    AgePatientService agePatientService;
    @GetMapping("/find")
    public List<AgePatient> selectAll() throws Exception{
        List<AgePatient> list=agePatientService.findAll();
        return list;
    }
}
